#ifndef XGAMEENGINE_H
#define XGAMEENGINE_H

#include <SFML/Graphics.hpp>
#include <vector>
#include "xgamestate.h"

class XGameEngine
{
public:
    XGameEngine();
    virtual ~XGameEngine();

    bool init(int width, int height);
    void handleEvent();
    void update();
    void draw();
    void cleanup();
    void quit();

    void changeState(XGameState* pState);
    void pushState(XGameState* pState);
    void popState();

    bool isRunning() const;
    sf::RenderWindow& getGameWindow();
    const sf::Input& getGameInput();

protected:
private:
    sf::RenderWindow m_gameWindow;
    std::vector<XGameState*> m_states;
};

#endif // XGAMEENGINE_H
